import requests  

# 复用浏览器的 ES 地址  
url = "http://116.62.50.24:9200"  

try:  
    response = requests.get(url, timeout=10)  
    if response.status_code == 200:  
        print("Python 成功连接 ES！")  
        print(response.json())  # 打印 ES 信息  
    else:  
        print(f"请求失败，状态码: {response.status_code}")  
except Exception as e:  
    print(f"连接异常: {e}")
